Contact State
<#4909#>
The visual effect of a contact upon the user interface is controlled by the
value of its <#429#>state<#429#> slot and is related to two
factors24.1.
- <#432#>Mapping<#432#>:
The concepts of <#433#>mapped<#433#>, <#435#>viewable<#435#>, and
<#437#>visible<#437#> apply to any <#439#>xlib:window<#439#> object and therefore
to contacts as well[#x-protocol##1###].
A contact is said to be ``mapped'' if <#441#>(xlib:map-window
contact)<#441#> has been called. A contact is ``viewable'' if it and all of its
ancestors are mapped. A contact is ``visible'' only if someone looking at the
display screen can actually see some part of it; that is, the contact is
viewable and is not completely occluded by any other windows.
- <#445#>Geometry management<#445#>: A contact under geometry management control is
said to be ``managed.'' As a
result of CLUE geometry management, any changes to the position or size of a
managed contact may affect the geometry of its managed siblings, its parent, and
(in general) any other managed member of the contact subtree to which it
belongs. Creating or destroying a managed contact can have a similar
result. However, changes involving an unmanaged contact
do not have this kind of ``ripple'' effect on the visible user interface.
These factors are not independent. In CLUE, it is invalid for a contact
to be mapped but unmanaged, because this contradicts the purpose of geometry
management24.2. Thus, the <#451#>state<#451#> slot of a
contact has one of three values.
:withdrawn |
The contact is unmanaged and unmapped. |
:managed |
The contact is managed but unmapped. |
:mapped |
The contact is both managed and mapped. |
The conditions corresponding to a contact's <#460#>state<#460#> are not guaranteed to be
satisfied until the contact is realized.
CLUE calls the <#463#>update-state<#463#> function
in
order to force consistency of the state of all contacts belonging to a <#465#>contact-display<#465#> (see Section~#ch:contact-display#466>).
<#4626#>
<#4156#><#468#>update-state Function, contact-display<#468#><#4156#>
#tex2html_wrap_inline9701#
<#4626#>
#tex2html_wrap_inline9704#
The default <#488#>state<#488#> value is <#489#>:mapped<#489#>. As a result, unless
specified otherwise, all contacts will automatically be viewable after
<#490#>update-state<#490#> is called (in particular, after a call to <#491#>process-next-event<#491#>). After initialization and realization,
the <#492#>(setf contact-state)<#492#> accessor method causes transitions in a contact's
state and its visible effect. The most common usages are setting a contact's
state to <#493#>:withdrawn<#493#> to withdraw it or to <#494#>:mapped<#494#> to present it.
=0 <#4919#>=0 <#4923#>